home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / STATS_A.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-30  |  1.5 KB  |  52 lines

  1. /* the structures used for area statistics */
  2.  
  3. struct area_data    {
  4.  
  5.     char     *name;            /* area name - from areas & areas.sys files */
  6.     struct area_data *next;        /* next in linked list */
  7.  
  8.     /* there are two 2 element arrays used:
  9.        xxx[0] is msgs listed, xxx[1] is msgs read
  10.        xxx2[0] is msgs received, xxx2[1] is number of area changes */
  11.     long    usage[2];        /* total cumulative usage */
  12.     long    usage2[2];        /* total cumulative usage */
  13.  
  14.     /* these are for daily and weekly stats - 2 element arrays, as before */
  15.     long    hourly[24][2];        /* hourly usage */
  16.     long    hourly2[24][2];        /* hourly usage */
  17.     long    daily[7][2];        /* daily usage */
  18.     long    daily2[7][2];        /* daily usage */
  19.     long    monthly[31][2];        /* day/month usage */
  20.     long    monthly2[31][2];    /* day/month usage */
  21.     long    yearly[12][2];        /* month/year usage */
  22.     long    yearly2[12][2];        /* month/year usage */
  23.  
  24.     /* these are the current hour and day - not updated till period is complete */
  25.     long    hour[2];        /* current hour's usage */
  26.     long    hour2[2];        /* current hour's usage */
  27.     long    day[2];            /* current day's usage */
  28.     long    day2[2];        /* current day's usage */
  29.     long    month[2];        /* current year's usage */
  30.     long    month2[2];        /* current year's usage */
  31. };
  32.  
  33.  
  34. struct area_stats    {
  35.     long    days;            /* days that stats are valid for */
  36.  
  37.     /* last stats start time */
  38.     time_t    start;
  39.  
  40.     /* last update time */
  41.     time_t    last;
  42.  
  43.     /* the count of area records */
  44.     short   count;
  45.  
  46.     /* the individual BBS's data records are stored in a linked list */
  47.     struct area_data *head;
  48. };
  49.  
  50.  
  51.  
  52.